package com.changpay.zywy.mvp.presenter

import com.changpay.zywy.base.BasePresenter
import com.changpay.zywy.ext.ss
import com.changpay.zywy.mvp.contract.ApplyDetailContract
import com.changpay.zywy.mvp.model.ApplyDetailModel


/**
 * Created by chenxz on 2018/5/27.
 */
class ApplyDetailPresenter : BasePresenter<ApplyDetailContract.Model, ApplyDetailContract.View>(), ApplyDetailContract.Presenter {
    override fun getSelfMachineInfo(map: MutableMap<String, String>) {
        mModel?.getSelfMachineInfo(map)?.ss(mModel, mView) {
            mView?.showSelfMachineInfo(it.result)
        }
    }

    override fun getCardChangeInfo(map: MutableMap<String, String>) {
        mModel?.getCardChangeInfo(map)?.ss(mModel, mView) {
            mView?.showCardChangeInfo(it.result)
        }
    }

    override fun getAllocationInfo(map: MutableMap<String, String>) {
        mModel?.getAllocationInfo(map)?.ss(mModel, mView) {
            mView?.showAllocationInfo(it.result)
        }
    }
    override fun createModel(): ApplyDetailContract.Model? = ApplyDetailModel()
}



